package calvin.study.rabbitmq.service.mq.impl;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import calvin.study.rabbitmq.service.mq.IMqService;

@Service
public class DirectExchangeService implements IMqService {

	@Autowired
	private RabbitTemplate rabbitTemplate;

	@Override
	public void pushMsg(String msg) throws Exception {
		rabbitTemplate.convertAndSend("direct_exchange", "sms", msg);
	}

}
